package com.wangyi.im.response;

public class IMResponse<T> {

    private String code;

    private String message;

    private Long size;

    private T data;

    private IMResponse(String code, String message,  Long size, T data){
        this.code = code;
        this.message = message;
        this.data = data;
        this.size = size;
    }

    public static class Builder<T>{

        private String code;

        private String message;

        private Long size;

        private T data;


        public IMResponse build(){
            return new IMResponse(code, message, size, data);
        }

        public Builder setCode(String code) {
            this.code = code;
            return this;
        }

        public Builder setMessage(String message) {
            this.message = message;
            return this;
        }

        public Builder setData(T data) {
            this.data = data;
            return this;
        }

        public Builder setSize(Long size) {
            this.size = size;
            return this;
        }
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public T getData() {
        return data;
    }

    public Long getSize() {
        return size;
    }
}
